var e = getApp();

Page({
    data: {
        language: ""
    },
    onLoad: function(o) {
        console.log("ressss::::", 111);
        var a = this, n = "";
        o.mid ? (console.log("ressss::::", 2222), n = e.getNetAddresss("order.another-pay-detail"), 
        n += "&pid=" + o.pid, n += "&mid=" + o.mid) : n = e.getNetAddresss("order.detail"), 
        n += "&order_id=" + o.order_id, e._getNetWork({
            url: n,
            success: function(e) {
                console.log(e);
                var o = 0, n = e.data.data;
                if (1 == e.data.result) {
                    if (console.log(e.data.data), n instanceof Array) {
                        for (var t in n) for (var r in n[t].has_many_order_goods) o += parseFloat(n[t].has_many_order_goods[r].price);
                        o = o.toFixed(2);
                    } else o = n.price;
                    a.setData({
                        price: o
                    });
                } else console.log("错误", e), wx.showToast({
                    title: "系统错误",
                    icon: "success",
                    duration: 3e3
                });
            },
            fail: function(e) {}
        });
    },
    goto1: function() {
        wx.reLaunch({
            url: "/packageG/member_v2/member_v2"
        });
    },
    goto2: function() {
        wx.reLaunch({
            url: "/packageG/index/index"
        });
    },
    onReady: function() {
        var e = wx.getStorageSync("langIndex");
        this.setData({
            language: e.en
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {}
});